﻿<UserControl x:Class="Blacklight.Showcase.Samples.InnerGlowBorderSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
         xmlns:controls="clr-namespace:Blacklight.Controls;assembly=Blacklight.Controls"
    >
    
    <UserControl.Resources>

        <controls:ResourceDictionaryManager x:Key="ResourceDictionaryManager">
            <controls:ResourceDictionaryManager.ResourceDictionaries>
                <controls:ResourceDictionaryCollection>

                    <controls:ResourceDictionary Path="/Blacklight.Showcase;component/ResourceDictionaries/DavesGlossyControls.xaml">
                        <controls:ResourceDictionary.ResourceKeys>
                            <controls:ResourceKeyCollection>
                                <controls:ResourceKey ResourceName="GlossyBlackSlider" />
                            </controls:ResourceKeyCollection>
                        </controls:ResourceDictionary.ResourceKeys>
                    </controls:ResourceDictionary>

                </controls:ResourceDictionaryCollection>
            </controls:ResourceDictionaryManager.ResourceDictionaries>
        </controls:ResourceDictionaryManager>

    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5"
                   Text="Inner Glow Opacity" VerticalAlignment="Center" />
        <Slider Width="195" Grid.Column="1" HorizontalAlignment="Left" Margin="10,5,5,5" Minimum="0" Maximum="1" Value="0.5"
                x:Name="opacitySlider" Style="{StaticResource GlossyBlackSlider}"/>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Column="2" TextWrapping="Wrap"
                   Text="(Value between 0 and 1)" VerticalAlignment="Center" />

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="1"
                   Text="Inner Glow Size" VerticalAlignment="Center" />
        <StackPanel Grid.Column="1" Grid.Row="1" Margin="5" VerticalAlignment="Center" Orientation="Horizontal">
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="25" x:Name="glowSizeLeftTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="25" x:Name="glowSizeTopTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="25" x:Name="glowSizeRightTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="25" x:Name="glowSizeBottomTextBox" />
        </StackPanel>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="1" Grid.Column="2" TextWrapping="Wrap"
                   Text="(A thickness around the left, top, right and bottom sides)" VerticalAlignment="Center" />

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="2"
                   Text="Corner Radius" VerticalAlignment="Center" />
        <StackPanel Grid.Column="1" Grid.Row="2" Margin="5" VerticalAlignment="Center" Orientation="Horizontal">
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="5" x:Name="cornerRadiusTopLeftTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="5" x:Name="cornerRadiusTopRightTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="5" x:Name="cornerRadiusBottomRightTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="5" x:Name="cornerRadiusBottomLeftTextBox" />
        </StackPanel>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="2" Grid.Column="2" TextWrapping="Wrap"
                   Text="(The radius for the top left, top right, bottom right and bottom left corners)" VerticalAlignment="Center" />

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="3"
                   Text="Inner Glow Color" VerticalAlignment="Center" />
        <StackPanel Grid.Column="1" Grid.Row="3" Margin="5" VerticalAlignment="Center" Orientation="Horizontal">
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="255" x:Name="innerGlowColorATextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="innerGlowColorRTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="innerGlowColorGTextBox" />
            <TextBox Width="40" Margin="5,0,5,0" FontSize="14" FontFamily="Verdana" Text="0" x:Name="innerGlowColorBTextBox" />
        </StackPanel>
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="3" Grid.Column="2" TextWrapping="Wrap"
                   Text="(A ARGB value, each from 0-255)" VerticalAlignment="Center" />

        <Border CornerRadius="10" Background="#ffffffff" Grid.Row="4" Grid.ColumnSpan="3" Margin="0,15,0,0">

            <controls:InnerGlowBorder x:Name="innerGlowBorder" 
                                      Background="#ffffffff"
                                      Margin="50"
                                      InnerGlowColor="#ff000000"
                                      InnerGlowSize="25,25,25,25"
                                      InnerGlowOpacity="0.5"
                                      CornerRadius="5,5,5,5"
                                      BorderBrush="#ff000000" BorderThickness="1,1,1,1"
                                      MinHeight="100"/>

        </Border>

    </Grid>
</UserControl>
